package com.pactera.asmp.server.dao;

import java.time.LocalDateTime;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.pactera.asmp.server.entity.UseCaseInfoSearchDTO;
import com.pactera.asmp.server.pojo.UseCaseInfo;
import com.pactera.asmp.server.pojo.UseCaseScriptRel;

@Mapper
public interface UseCaseInfoMapper {

    List<UseCaseInfo> select(UseCaseInfoSearchDTO useCaseInfoSearchDTO);

    List<UseCaseScriptRel> selectRefsByUseCaseIds(@Param("datas") List<Long> datas);

    int insert(UseCaseInfo useCaseInfo);

    int insertRel(UseCaseScriptRel useCaseScriptRel);

    int deleteByPrimaryKey(@Param("id") Long id, @Param("updateTime") LocalDateTime updateTime);

    int deleteRelByUseCaseId(@Param("useCaseId") Long useCaseId);

    int update(UseCaseInfo useCaseInfo);

    UseCaseInfo selectByNameAndProjectId(@Param("name") String name, @Param("projectId") Integer projectId);

    Long summaryUseCaseByProjectId(@Param("projectId") Integer projectId);
}
